package com.study.services;

import java.util.List;

import java.util.List;

import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.study.model.jdao.IDictionaryDAO;
import com.study.model.mdao.DictionaryMapper;
import com.study.model.pojo.Dictionary;

@Service

@Transactional(rollbackOn = Exception.class)
public class DictionaryService {
	
	@Autowired
	IDictionaryDAO dao;
	

	@Autowired
	DictionaryMapper diMapper;
	
	/**
	 * 根据父id查询
	 */
	public Dictionary findByDicId(int did) {
		return dao.findByDicId(did);
	}
	
	/**
	 * 查询所有字典表信息
	 * @return
	 */
	public List<Dictionary> findByAll(){
		return diMapper.selectAll();
	}

}
